Skip to content

feat(meter): optional PVC for billing file cache - #1627

Open
ioito wants to merge 1 commit into
yunionio:masterfrom
ioito:feat/meter-mount-data-pvc
Open

ioito wants to merge 1 commit into
yunionio:masterfrom
ioito:feat/meter-mount-data-pvc

Conversation

@ioito

@ioito ioito commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add optional spec.meter.mountDataPVC (default false)
  • When enabled, create/mount PVC at /opt/yunion/meter so billing/rates downloads survive meter pod restarts
  • Keep controller nodeAffinity so WaitForFirstConsumer binds PVC on the same node as meter

Test plan

  • Default (mountDataPVC omitted/false): meter deploy has no data PVC/volume
  • kubectl -n onecloud patch oc default --type=merge -p '{"spec":{"meter":{"mountDataPVC":true}}}'
  • PVC default-meter Bound; meter mounts /opt/yunion/meter
  • Pull a bill once, restart meter pod, confirm local billing files remain and re-pull skips download

Add spec.meter.mountDataPVC (default false) so downloaded billing/rates
files can persist across meter pod restarts when enabled for testing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant